import { Component, OnInit } from '@angular/core';
import { AdminService } from 'app/modules/admin-manager/services/admin.service';

@Component({
	selector: 'm-settings',
	templateUrl: './settings.component.html',
	styleUrls: ['./settings.component.scss'],
})
export class SettingsComponent implements OnInit {
	constructor(private adminService: AdminService) {}

	tabs$ = this.adminService.menu_visibility().then(resp => {
		if (!resp.system_config) {
			return TabList.slice(0, 2);
		}
		return TabList;
	});

	ngOnInit() {}
}
const TabList = [
	{ link: '/settings/info', name: '信息', icon: 'info' },
	{ link: '/settings/admin', name: '管理员设置', icon: 'account_circle' },
	{ link: '/settings/enterprise', name: '企业定制', icon: 'tune' },
	{ link: '/settings/warehouse', name: '内网仓库', icon: 'settings' },
	{ link: '/settings/client_update', name: '更新客户端', icon: 'update' },
	// { link: '/settings/platform_setting', name: '平台配置', icon: 'update' },
	{ link: '/settings/platform_setting1', name: '平台配置', icon: 'update' },
];
